import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';


@Injectable()
export class ParamService {

  private headers = new Headers({ 'Content-Type': 'application/json' });
  private apiUrl = 'http://localhost:8080/';  // URL to web API
  constructor(private http: HttpClient) { }

  getTest(): Observable<any> {
    return this.http.get(this.apiUrl + 'map');
  }



  private handleError(error: any): Promise<any> {
    console.error('An error occurred', error); // for demo purposes only
    return Promise.reject(error.message || error);
  }
}
